package com.jxsd.edu.cn.struts2.daoImpl;

import java.util.List;

import com.jxsd.edu.cn.struts2.dao.AttributeDao;
import com.jxsd.edu.cn.struts2.models.Attributes;
import com.jxsd.edu.cn.tools.ResultList;

public class AttributeDaoImpl  implements   AttributeDao 
{

	@Override
	public List<Attributes> getSmallAttributes(String smallName) 
	{
		List<Attributes>  list=null;
		String  sql="select  AttributeName  from  smallAttriView  where  smallName=?";
		Object[]  params={smallName};
		ResultList<Attributes>  hander=new  ResultList<Attributes>();
		try {
			list=hander.handler(sql, params, Attributes.class);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}

	@Override
	public List<Attributes> getCataAttributes(String catagoryName) {
		List<Attributes>  list=null;
		String  sql="select  AttributeName  from  cataAttriView  where  catagoryName=?";
		Object[]  params={catagoryName};
		ResultList<Attributes>  hander=new  ResultList<Attributes>();
		try {
			list=hander.handler(sql, params, Attributes.class);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}

}
